import React from "react"
import styles from "./index.module.css";

const Xbox = (props) => {
    const { list } = props;
    const BBwidth=list.length*110+"px" 
    const Box = list.map((item,index) => {
        return (
            <div key={index} className={styles["box"]} >
                <img src={item.src} className={styles["img"]}/>
               <div className={styles["title"]}>
                    <p>{item.price}</p></div>
            </div>
        )
    })
    return (
        <div className={styles["AA"]}>
           <div className={styles["BB"]} style={{width:BBwidth}}>
           {Box}
           </div>
        </div>
    )
}
export default Xbox